import { createRouter, createWebHashHistory } from 'vue-router'
import MainHome from '../views/briefinfo/MainHome.vue'

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      name: 'home',
      redirect: 'main',
    },
    {
      path: '/search',
      name: 'search',
      redirect: 'main',
    },
    {
      path: '/main',
      name: 'main',
      component: MainHome
    },
    {
      path: '/theme',
      name: 'theme',
      component: () => import('../views/theme/ThemeEditor.vue'),
      children: [
        {
          path: '/component',
          name: 'component',
          component: () => import('../views/theme/ComponentsCard.vue')
        }
      ]
    },
    {
      path: '/customRender',
      name: 'customRender',
      component: () => import('../views/customRender/index.vue'),
    },
    {
      path: '/demo',
      name: 'demo',
      component: () => import('../views/demo/MarkDown.vue'),
    }
  ]
})

export default router
